﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ClassLibrary.DAO;

public partial class Admin_ucControl_ucListDSDKLaiXe : System.Web.UI.UserControl
{
    TblDKLaiThuDAO dkDAO = new TblDKLaiThuDAO(Global.CONNECTION_STRING);

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            grdDSDKLaiXe.DataSource = dkDAO.GetAll();
            grdDSDKLaiXe.DataBind();
        }
    }
    protected void btnSearch_1_Onclick(object sender, EventArgs e)
    {
        grdDSDKLaiXe.DataSource = dkDAO.Search(txtName.Text.Trim(), sdt.Text.Trim());
        grdDSDKLaiXe.DataBind();
    }
    protected void grdDSDKLaiXe_PageIndexChanging(object sender, GridViewPageEventArgs e)
    {
        grdDSDKLaiXe.PageIndex = e.NewPageIndex;
        grdDSDKLaiXe.DataSource = dkDAO.GetAll();
        grdDSDKLaiXe.DataBind();
    }
    protected void grdDSDKLaiXe_RowDataBound(object sender, GridViewRowEventArgs e)
    {

    }
}